import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../controllers/list.dart';

class UserPage extends StatefulWidget {
  const UserPage({super.key});

  @override
  State<UserPage> createState() => _UserPageState();
}

class _UserPageState extends State<UserPage> {
  // 获取list实例
  ListController listController = Get.find();
  @override
  Widget build(BuildContext context) {
    return Obx(() {
      return ListView(
        children: listController.list
            .map(
              (value) => ListTile(
                title: Text(value),
              ),
            )
            .toList(),
      );
    });
  }
}
